(prompt "Do you want to install or de-install AmiTCPHelper?")
(choices "Install AmiTCPHelper" "Remove AmiTCPHelper" "Remove but leave CanDO library")
(help @askchoice-help)
)
)
(welcome)
(set #oldUserLevel @user-level)
(user 2) ;don't start right
(while (= (getassign "HOME") "")
(message "\n\n\nI cannot find the HOME: assign.\n\nThis is normally set when you start AmiTCP.\nMake sure you have started AmiTCP\nif not do so now, before proceeding\n\nIf AmiTCP has been started then you've got a problem.\n Abort and adjust your AmiTCP installation or something.")
)
(user #oldUserLevel)
(if (> #installOrNot 0)
(
(delete "AmiTCP:AmiTCPHelper"
(infos)
(prompt "Removing AmiTCPHelper")
)
(delete "HOME:.tracelist")
(delete "HOME:.fingerlist")
(delete "HOME:.pinglist")
(delete "HOME:.telnetlist")
(if (= #installOrNot 1)
(delete "Libs:cando.library")
)
(exit "\n\n\nWell, you asked for it, AmiTCPHelper on your machine is no more, it's your loss.")
)
)
(set #destination
(askdir
(help @askdir-help)
(prompt "Where do you want AmiTCPHelper installed? No drawer will be made.")
(default "AmiTCP:")
)
)
(set @default-dest #destination) ;got to do this if you abort before you get a shity error
(help "The eight colour icon uses the MagicWB palette and is freely inspired by, or stolen from, if you prefer, Martin Huttenholer's superb MagicWB set of icons. The four colour version is still based upon the MagicWB theme, but with only half the colour.")
)
)
(set #newnntpscript 1) ;copy it unless an expert say noooooo
(if (= #oldUserLevel 2)
(set #newnntpscript
(askbool
(prompt "Do you want the new NNTP transfer script?")
(help "The provided nntptransfer script has a couple of alterations to the one provided by DIS, namely paths for all the commands and an automatic retry if News is busy (thanks Tez (Tez@tezboyes.demon.co.uk)).")
)
)
)
(complete 10)
(copyfiles
(prompt "Copying AmiTCPHelper")
(source "AmiTCPHelper")
(dest @default-dest)
(optional nofail)
(infos)
(noposition)
)
(complete 30)
(if (exists "cando.library")
(
(copylib
(prompt "Copying CanDo library")
(source "cando.library")
(dest "libs:")
(optional nofail)
)
)
)
(complete 70)
;mmm could do this with one procedure and pass argument names but
;it only works with the new installer and I can't be arsed so
;looks like I'll do some cut and pasting
(if (exists "usr:lib/fings")
(
(copyfiles
(prompt "moving old fings file")
(source "usr:lib/fings")
(dest "HOME:")
(newname ".fingerlist")
)
(delete "usr:lib/fings")
)
(
(copyfiles
(prompt "copy finger list to HOME:")
(source ".fingerlist")
(dest "HOME:")
)
)
)
(if (exists "usr:lib/clocks")
(
(copyfiles
(prompt "moving and renaming old clocks file")
(source "usr:lib/clocks")
(dest "HOME:")
(newname ".tracelist")
)
(delete "usr:lib/clocks")
)
(
(copyfiles
(prompt "copy trace list to HOME:")
(source ".tracelist")
(dest "HOME:")
)
)
)
(if (exists "usr:lib/pings")
(
(copyfiles
(prompt "moving old ping file")
(source "usr:lib/pings")
(dest "HOME:")
(newname ".pinglist")
)
(delete "usr:lib/pings")
)
(
(copyfiles
(prompt "copy ping list to HOME:")
(source ".pinglist")
(dest "HOME:")
)
)
)
(if (exists "usr:lib/telnets")
(
(copyfiles
(prompt "moving old telnet file")
(source "usr:lib/telnets")
(dest "HOME:")
(newname ".telnetlist")
)
(delete "usr:lib/telnets")
)
(
(copyfiles
(prompt "copy telnet list to HOME:")
(source ".telnetlist")
(dest "HOME:")
)
)
)
(complete 80)
(if (= 1 #whichIcon)
(copyfiles
(prompt "copying 4 colour icon")
(source "AmiTCPHelper.4colour.info")
(dest @default-dest)
(newname "AmiTCPHelper.info")
)
)
(if (= #newnntpscript 1)
(copyfiles
(prompt "copying new nntp transfer script")
(source "nntptransfer")
(dest "AmiTCP:bin")
)
)
(complete 100)
(exit "\n\n\nI hope you enjoy AmiTCPHelper. \n\nI'll enjoy it even more if you send me a tenner...")